

<!DOCTYPE HTML>
<html lang="zh-cmn-hans">
  <head>
    <!-- 
          鸡年&快乐
       __________________
           .=""=.
          / _  _ \
         |  d  b  |
         \   /\   /            
        ,/'-=\/=-'\,    
       / /        \ \   
      | /          \ |   
      \/ \        / \/    
          '.    .'         
          _|`~~`|_            
          /|\  /|\    
       __________________        
    -->
      <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
      <meta name="renderer" content="webkit|ie-comp|ie-stand">
      <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
      <link rel="Bookmark" href="./img/favicon.ico" >
      <link rel="Shortcut Icon" href="./img/favicon.ico" />
      <meta name="robots" content="菜亿车, APP下载" />
      <meta name="viewport" content="initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
      <meta name="keywords" content="菜亿车, APP下载中心">
      <meta name="description" content="菜亿车APP下载中心">
      <title>菜亿车 · APP下载</title>
      <style type="text/css">
        html, body, div, p, span, img {
          padding: 0;
          margin: 0;
        }
        html, body {
          font-size: 18px;
          overflow: hidden;
        }
        .body {
          position: fixed;
          left: 0;
          right: 0;
          top: 0;
          bottom: 0;
        }
        .container {
          width: 100%;
          height: 100%;
        }
        .container:before, .wx-browser:before {
          content: '';
          position: fixed;
          top: 0;
          left: 0;
          bottom: 0;
          right: 0;
          z-index: -1;
        }
        .container:before {
          background-color: #ffe037;
        }
        .logo {
          position: relative;
          margin: 100px auto 80px;
          width: 180px;
          height: 180px;
          box-shadow: 4px 4px 8px 0px #656565;
        }
        .logo-img {
          width: 100%;
          height: 100%;
          display: block;
        }
        .download-list {
          position: relative;
          height: 132px;
        }
        .download-item {
          width: 200px;
          height: 28px;
          line-height: 28px;
          text-align: left;
          padding: 10px 0;
          margin: 0 auto;
          background-color: #fff;
          border-radius: 28px;
          box-shadow: 0px 2px 8px 0px #999;
          cursor: pointer;
          box-sizing: content-box;
        }
        .download-item:active {
          opacity: .8;
        }
        .download-item:first-child {
          margin-bottom: 30px;
        }
        .download-item-img {
          width: 28px;
          height: 28px;
          margin: 0 10px 0 20px;
          vertical-align: bottom;
        }
        .wx-browser {
          position: absolute;
          top: 0;
          left: 0;
          z-index: 999;
          width: 100%;
          height: 100%;
          display: none;
        }
        .wx-browser:before {
          background-color: #000;
          opacity: .5;
        }
        .wx-indicate {
          position: absolute;
          top: 20px;
          right: 42px;
          width: 36px;
          height: 36px;
        }
        .wx-window {
          position: relative;
          width: 260px;
          height: 260px;
          border-radius: 50%;
          background: #000;
          margin: 66px auto 0;
          text-align: center;
          font-size: 14px;
          color: #fee298;
        }
        .wx-cash {
          width: 82px;
          height: 58px;
          margin: 42px auto 20px;
        }
        .wx-p {
          margin-bottom: 5px;
          opacity: .75;
        }
        .wx-dot {
          width: 20px;
          height: 20px;
          vertical-align: middle;
        }
      </style>
  </head>
  <body>
    <div class="container">
      <div id="logo" class="logo">
        <img class="logo-img" src="./img/download/logo.png">
      </div>
      <div class="download-list">
        <div id="driver" class="download-item">
          <img class="download-item-img" src="./img/download/driver.png">
          <span class="download-item-span">下载车主版</span>
        </div>
        <div id="shipper" class="download-item">
          <img class="download-item-img" src="./img/download/shipper.png">
          <span class="download-item-span">下载货主版</span>
        </div>
      </div>
      <div id="wx-browser" class="wx-browser">
        <img class="wx-indicate" src="./img/download/indicate.png">
        <div class="wx-window">
          <img class="wx-cash" src="./img/download/cash.png">
          <p class="wx-p">你离赚大钱只差一步了!</p>
          <p class="wx-p">
            请点击右上角“<img class="wx-dot" src="./img/download/dot.png">”
          </p>
          <p class="wx-p">选择“在浏览器打开”</p>
        </div>
      </div>
    </div>
    <script type="text/javascript">
    ;(function () {
      var isWx = false,
          isAndroid = false,
          isIos = false,
          ua = window.navigator.userAgent,
          downloadDriverUrl = 'http://shouji.baidu.com/software/22701002.html',
          downloadShipperUrl = 'http://shouji.baidu.com/software/22416873.html';
      if (/MicroMessenger/i.test(ua)) {
        isWx = true;
      }
      if (/android/i.test(ua)){
        isAndroid = true;
        downloadDriverUrl  = 'http://shouji.baidu.com/software/22701002.html';
        downloadShipperUrl = 'http://shouji.baidu.com/software/22416873.html';
      }
      if (/(iPhone|iPad|iPod|iOS)/i.test(ua)) {
        isIos = true;
        downloadDriverUrl = 'https://itunes.apple.com/cn/app/%E8%8F%9C%E4%BA%BF%E8%BD%A6-%E8%BD%A6%E4%B8%BB%E7%AB%AF/id1273611789?mt=8';
        downloadShipperUrl = 'https://itunes.apple.com/cn/app/%E8%8F%9C%E4%BA%BF%E8%BD%A6-%E8%B4%A7%E4%B8%BB%E7%AB%AF/id1291739301?mt=8';
      }

      var wxBrowser = document.getElementById('wx-browser'),
          logo = document.getElementById('logo');
      wxBrowser.addEventListener('click', function () {
        logo.style.opacity = 1;
        wxBrowser.style.display = 'none';
      })

      document.getElementById('driver').addEventListener('click', function () {
        goDownload('driver')
      });
      document.getElementById('shipper').addEventListener('click', function () {
        goDownload('shipper')
      });

      function goDownload(type) {
        var downloadUrl;
        if (type === 'driver') {
          downloadUrl = downloadDriverUrl
        } else {
          downloadUrl = downloadShipperUrl;
        }
        if (isWx) {
          wxBrowser.style.display = 'block';
          logo.style.opacity = 0;
        } else {
          window.location.href = downloadUrl;
        }
      }
    })();
    </script>
  </body>
</html>
